package com.jiuqi.ccp.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="CCP_QUARTZ_RELATION"
 *     
*/
public class CcpQuartzRelation implements Serializable {

    /** identifier field */
    private String cqrGuid;

    /** nullable persistent field */
    private String cqwGuid;

    /** nullable persistent field */
    private String cqjGuid;

    /** full constructor */
    public CcpQuartzRelation(String cqrGuid, String cqwGuid, String cqjGuid) {
        this.cqrGuid = cqrGuid;
        this.cqwGuid = cqwGuid;
        this.cqjGuid = cqjGuid;
    }

    /** default constructor */
    public CcpQuartzRelation() {
    }

    /** minimal constructor */
    public CcpQuartzRelation(String cqrGuid) {
        this.cqrGuid = cqrGuid;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="CQR_GUID"
     *         
     */
    public String getCqrGuid() {
        return this.cqrGuid;
    }

    public void setCqrGuid(String cqrGuid) {
        this.cqrGuid = cqrGuid;
    }

    /** 
     *            @hibernate.property
     *             column="CQW_GUID"
     *             length="32"
     *         
     */
    public String getCqwGuid() {
        return this.cqwGuid;
    }

    public void setCqwGuid(String cqwGuid) {
        this.cqwGuid = cqwGuid;
    }

    /** 
     *            @hibernate.property
     *             column="CQJ_GUID"
     *             length="32"
     *         
     */
    public String getCqjGuid() {
        return this.cqjGuid;
    }

    public void setCqjGuid(String cqjGuid) {
        this.cqjGuid = cqjGuid;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("cqrGuid", getCqrGuid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof CcpQuartzRelation) ) return false;
        CcpQuartzRelation castOther = (CcpQuartzRelation) other;
        return new EqualsBuilder()
            .append(this.getCqrGuid(), castOther.getCqrGuid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getCqrGuid())
            .toHashCode();
    }

}
